#ifndef Z_HOME
#define Z_HOME

#include "FloorPlan.h"
#include "system.h"
#include "S_sensor.h"

class home{
public:
    inline home();
    inline void setDC(CDC *pDC);
    inline CDC* getDC();
    inline void addFloor(floor* f);
    inline void homecheck();

    inline void Draw();
    
    
    controlsystem con_sys;
    home_info home_information;
private:
    floor *F[12];
    int num_floor;
    CDC *p;
};


home::home(){
    num_floor = 0;
    home_information.gas = 0;
    home_information.tem = 25;
    home_information.humi = 5;
    
}

void home::setDC(CDC *pDC){
    p = pDC;
    con_sys.setDC(pDC);
}

CDC* home::getDC(){
    return p;
}

void home::addFloor(floor* f){
    f->setDC(p);
    f->Draw();
    f = NULL;
}

void home::Draw(){
    /*for(int i = 0; i<num_floor ; i++){
        F[i]->setDC(p);
        F[i]->Draw();
        F[i]=NULL;
    }*/
}

void home::homecheck() {
    for(int i = 0 ; i<con_sys.num_sensor ;i++){
        con_sys.sensor[i].setInformataion(home_information);
    }
}
#endif
    